<!--main-container-part-->
<div id="content">
    <!--breadcrumbs-->
    <div id="content-header">
        <div id="breadcrumb">
            <a href="/backend/index.html" title="返回后台首页" class="tip-bottom"> <i class="icon-home"></i>
                后台首页
            </a>
            <a href="#" class="current">分类管理</a>

        </div>
        <h1>分类管理</h1>
    </div>

    <div class="container-fluid">
        <hr>
        <div class="row-fluid">
            <div class="span12">

                <div class="widget-box">
                    <div class="widget-title">
                        <h5>分类列表</h5>
                    </div>
                    <div class="widget-content nopadding">
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>名称</th>
                                    <th>是否外链</th>
                                    <th>是否显示</th>
                                    <th>模型</th>
                                    <th>列表模版</th>
                                    <th>内容模版</th>
                                    <th>排序</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <volist name="cate" id="vo">
                                <tr>
                                    <td>{$vo.cid}</td>
                                    <td> 
                                        <if condition="$vo['pid'] eq 0">
                                            <i class="icon-plus-sign " issub="0" havesub="0" style="cursor:pointer"></i><else/>
                                        </if>
                                        </else>{$vo.html}{$vo.name}
                                    </td>
                                    <td>
                                        <if condition="$vo['islink'] eq 1"><i class="icon-ok"></i>
                                        <else/><i class="icon-remove"></i>
                                        </if>
                                    </td>
                                    <td>
                                        <if condition="$vo['display'] eq 1"><i class="icon-ok"></i>
                                        <else /><i class="icon-remove"></i>
                                        </if>
                                    </td>
                                    <td>{$vo.module_id}</td>
                                    <td>{$vo.temp_list}</td>
                                    <td>{$vo.temp_detail}</td>
                                    <td>{$vo.weight}</td>
                                    <td>
                                        <a href="__CONTROLLER__/edit/cid/{$vo.cid}" class="btn btn-primary btn-mini">修改</a>
                                        <a href="__CONTROLLER__/delete/cid/{$vo.cid}" onclick="return confirm('是否删除?')" class="btn btn-danger btn-mini">删除</a>
                                    </td>
                                </tr>
                            </volist>
                                <tr>
                                    <td colspan="9">
                                        <a class="btn btn-primary btn-mini" href="__CONTROLLER__/add">添加分类</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!--End-breadcrumbs-->

</div>

<!--end-main-container-part-->

<!-- 分类特效开始 -->
<script type="text/javascript">
  $(function(){
    $('.openSub').click(function(){
      var topid = $(this).attr('id');
      var open = $(this).attr('isSub');
      var haveSub = $(this).attr('haveSub');
      if(haveSub == 0)return;
      if(open == 1){
        $(this).removeClass("icon-plus-sign");
        $(this).addClass("icon-minus-sign");
        $(this).attr('isSub', 0);
        $('.top_'+topid).css('display', '')
      }else{
        $(this).removeClass("icon-minus-sign");
        $(this).addClass("icon-plus-sign");
        $(this).attr('isSub', 1);
        $('.top_'+topid).css('display', 'none')
      }
    })
  })
</script>

<!-- 分类特效结束 -->